#!/usr/local/bin/v run

import term

term.clear()

println(term.ok_message('开始构建命令'))
system('go build -ldflags "-s -w"  -o pmon2 pmon2.go')
system('go build -ldflags "-s -w"  -o worker worker.go')
system('go build -ldflags "-s -w"  -o pmond pmond.go')

println(term.ok_message('压缩二进制命令'))

system('upx -9 pmon2')

system('upx -9 worker')

system('upx -9 pmond')

println(term.ok_message('构建完成!'))

println('请配置PMON2_CONFIG_FILE环境变量\n然后启动pmond服务')

